#ifndef __SESSION_FACTORY_H_INCLUDED__
#define __SESSION_FACTORY_H_INCLUDED__

#include "forward_session_tcp.h"
#include "forward_session_udp.h"


#ifdef __cplusplus
extern "C" {
#endif

/**
 * 会话工厂类
 */
class session_factory{

public:

	enum SESSION_TYPE{
		TCP,
		UDP,
	};

	~session_factory();
	forward_session* create_session(SESSION_TYPE t, forward_pair& fwd_pair);

	static session_factory* get_instance();
	static void destroy_instance();

private:

	session_factory();
	static session_factory* instance;
};

#ifdef __cplusplus
}
#endif

#endif // __SESSION_FACTORY_H_INCLUDED__
